import 'package:flutter/material.dart';
import 'package:flutter_architecture/utils/screen_util.dart';
import 'package:flutter_architecture/widgets/time/time_counter_reverse_widget.dart';
import 'package:flutter_architecture/widgets/video/video_widget.dart';

/// 欢迎页面
/// todo
/// @author: dingwen
/// @date: 2021/1/3

class WelcomePage extends StatefulWidget {
  @override
  _WelcomePageState createState() => _WelcomePageState();
}

class _WelcomePageState extends State<WelcomePage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.instance = ScreenUtil(width: 1080, height: 2340)..init(context);
    return Scaffold(
      body: Container(
        width: double.infinity,
        height: double.infinity,
        child: Stack(
          children: [
            //视屏播放
            Positioned.fill(
                child: Hero(
              tag: 'welcome_page',
              child: Material(
                color: Colors.transparent,
                child: VideoWidget(),
              ),
            )),
            //倒计时
            Positioned(
              child: TimeCounterReverseWidget(),
              right: sWidth(20),
              bottom: sHeight(66),
            )
          ],
        ),
      ),
    );
  }
}
